<template>
	<view class="tabbar">
		<u-tabbar :value="tabbarIndex"  activeColor="#25d4d0" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true">
			<u-tabbar-item text="广场" icon="home" @click="tabbarCheck(0)"></u-tabbar-item>
			<u-tabbar-item text="发布" icon="bell"  @click="tabbarCheck(1)"></u-tabbar-item>
			<u-tabbar-item text="我的" icon="account" @click="tabbarCheck(2)"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		components: {
		},
		data() {
			return {
				tabbarIndex:0
			};
		},
		onLoad() {
		},
		onShow() {
			
		},
		methods: {
			tabbarCheck(index){
			   	this.tabbarIndex = index
				this.$emit('changeIndex',index)
			},
			toPage(url){
				uni.redirectTo({
					url
				})
			}
		}
	};
</script>


<style lang="scss" scoped>
	.tabbar{
		height: 120rpx;
		position: fixed;
		bottom: 0;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		background-color: #fff;
		z-index: 1000;
		.list{
			width: 33.3%;
			height: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;
			font-size: 26rpx;
			image{
				width: 40rpx;
				height: auto;
				margin-bottom: 10rpx;
			}
		}
	}
</style>